Multiprocessor system and multigrain parallelizing compiler

ABSTRACT

Provided is a multiprocessor system and a compiler used in the system for automatically extracting tasks having parallelism from an input program to be processed, performing scheduling to efficiently operate processor units by arranging the tasks according to characteristics of the processor units, and generating codes for optimizing a system frequency and a power supply voltage by estimating a processing amount of the processor units.

Cross-Reference To Related Applications

This application is a Divisional application of U.S. application Ser.No. 11/660,104 filed on Feb. 13, 2007, which is a national stageapplication of PCT/JP2006/308161 filed on Apr. 12, 2006, the disclosuresof which are hereby incorporated by reference. The present applicationclaims priority from U.S. application Ser. No. 11/660,104 filed on Feb.13, 2007, which claims priority from National Stage ApplicationPCT/JP2006/308161 filed on Apr. 12, 2006, which claims priority fromJapanese Application 2005-114842 filed on Apr. 12, 2005, the content ofwhich is hereby incorporated by reference into this application.

TECHNICAL FIELD

This invention relates to a hardware configuration that can be adoptedfor a multiprocessor system constituted of a plurality of processorunits for enabling efficient operation of the plurality of processorunits in the multiprocessor system, and to a compiler for generatingprograms used in the multiprocessor system.

BACKGROUND ART

Device miniaturization due to a progress in a semiconductormanufacturing technology has enabled integration of a huge number oftransistors. Simultaneously, a progress has been made in achievinghigher operation frequencies of a processor. However, an increase ofoperation power and an increase of standby power caused by a leakagecurrent, the limit has begun to be seen in performance improvement of aprocessor which has been achieved conventionally by increasing operationfrequency and improving a logical system.

Therefore, at present, as means for improving performance and attaininglower power consumption, a multiprocessor system (i.e., a single chipmultiprocessor system) appears promising. In the multiprocessor system,a plurality of processor units (hereinafter, referred to as PU) such asconventional CPU and digital signal processor are mounted on a chip andoperated in parallel to thereby obtain high arithmetic operationperformance without increasing an operation frequency processes inparallel. In the future, it is expected that a further progress inminiaturization will enable 100 to 1000 PUs to be mounted on a chip.

In such a multiprocessor system, to obtain arithmetic operationperformance proportional to the number of PUs, the mounted PUs must besimultaneously operated to process programs. However, descriptions ofprogram manipulation are generally made in time sequence, which hindersto attain the arithmetic operation performance expected to be inproportion to the number of PUs, despite the plurality of mounted PUs.

In order to solve the above-mentioned problem, there is a method inwhich a program developer himself rewrites original programs by addingparallelization codes to the programs, with consideration given toparallelism of the programs for executing the programs on the pluralityof PUs, based on the configuration of the multiprocessor system in whichthe programs are to be executed. This method is useful for a systemwhich includes only a few PUs, however, this method is not practical ina case of a future system which has several tens to several thousands ofPUs mounted therein, especially when the PUs are of different types, interms of development time or effective performance.

Accordingly, studies have already been made on an automaticparallelization compiler, for use in a multiprocessor system constitutedof a plurality of PUs similar in configuration and arithmetic operationperformance, which analyzes input programs, extracts parallely operableparts from the programs, and allocates these parts to a plurality of PUsfor simultaneous execution. For example, JP 2004-252728 A discloses acompilation system in which an input source program is analyzed fordividing the program into blocks (i.e., tasks) of various grain sizessuch as subroutines or loops to analyze parallelism among the pluralityof tasks, and the tasks and data to be accessed by the tasks are dividedinto sizes suited to a cache or local memory, to optimally allocate thetasks to the PUs to thereby generate an object program for efficientlyoperating the multiprocessor system. An architecture of a chipmultiprocessor for supporting the multigrain parallel processingfunction is disclosed in JP 2001-175619 A.

In the multiprocessor system, a reduction of power consumption in eachPU is essential to reduce power consumption and exhaust heat. Variousproposals have been made regarding methods for reducing power of theindividual processors. For example, a method for reducing power bydynamically controlling a frequency/voltage, i.e., reducing a systemclock of a processor within real-time processing restrictions andsupplying a voltage according to the system frequency to the processoris disclosed in JP 3138737 B and JP 2004-2341126 A.

In addition, according to a method disclosed in JP 2004-252900 A, aplurality of different kinds of processors such as CPU or digital signalprocessor are combined according to characteristics of each processing,whose processing time and power consumption on the processors aremeasured and provided as information beforehand, thereby dynamicallyallocating a series of processes to the processors based on theinformation.

DISCLOSURE OF THE INVENTION

Currently, new applications are being generated for use in an automobilenavigation system, a portable telephone, a digital television, or thelike for simultaneously treating variety of data such as an image,voice, and database information. Under the circumstances, it is expectedthat the processor will have plural types of PUs mounted thereon tosimultaneously process various kinds of input data by the method optimalfor each kind of data. As disclosed in JP 2004-252728 A, a conventionalmultiprocessor system is a homogeneous processor system which includes aplurality of similarly configured PUs mounted thereon.

However, in a future heterogeneous multiprocessor system forsimultaneously processing various applications on a variety of PUs,there is a problem that processing efficiency in proportion to the typesand the number of PUs to be mounted cannot be attained unless programsare paralleled and arranged with consideration given to the types ofPUs.

Up to now, for efficient execution of programs on the plurality of PUs,in a case where a small program or a processing sequence can always beexecuted in a fixed manner, it is necessary that the program first beexecuted in the system to measure processing time and the like, and thatthe developer manually generate the schedule information based on themeasured value in order to obtain schedule information such as executiontime for scheduling which consumes a large amount of labor and time.

In this case, in a case of a general program whose processing contentsor sequence cannot be confirmed beforehand, or in a case of a programespecially large, it is difficult to manually generate the informationbeforehand. Similarly in a case where the types or the number of PUsincrease, it is also difficult to manually generate the information.

In the system including many PUs mounted thereon, there is a fear thatpower consumption of the entire processor will increase. Accordingly, inapplying the system especially to a mobile device such as a portabletelephone or a digital television used at home, power supply managementor system frequency control need to be more precisely performeddepending on a processing state of each PU by software in eachapplication program in addition to the conventional frequency andvoltage (i.e., system frequency and driving voltage) control by theoperating system.

In particular, it is necessary to reduce power consumption withoutdegrading processing performance. In executing a program requiringreal-time processing, it is also necessary to reduce power consumptionwhile complying with time restrictions.

It is therefore an object of this invention to provide a multiprocessorsystem including various types of PUs mounted thereon, and a compilerused in the system for efficiently operating the PUs by automaticallyextracting parallel tasks from an input program to be processed, and byarranging the tasks according to characteristics of the PUs, and furtherfor generating codes for optimizing a system frequency, a power supplyvoltage, or the like by estimating a processing amount of the PUs andadding the codes to an object program, the multiprocessor systemenabling optimization thereof.

Therefore, according to this invention, due to the compiler used in themultiprocessor system which integrates various processor units, theprograms are divided and arranged for efficiently operating theprocessor units and control codes (i.e., execution codes) are generated,which minimizes processing time and makes a process to be carried out atlow power while making maximum use of performance of the processorsystem. Moreover, a software developer can efficiently create programswithin a short time without giving consideration to a configuration ofthe processor unit.

When the input program is compiled, the compiler estimates processingtime beforehand based on the processor unit configuration, and schedulestasks whose processing order is decided beforehand at compiling stage toeach processor. In case processing order cannot be determined atcompiling time, the compiler generates dynamic scheduling codes whichassign such tasks to processors at runtime based on processinginformation containing execution time. Accordingly, a general programcan be efficiently processed by the multiprocessor system constituted ofvarious processor units.

The compiler analyzes the input program, estimates processing time aftertask scheduling, and precisely executes power supply management andfrequency control for each processor unit with giving consideration to amargin of the processing time with respect to time restrictions. Hence,power consumption can be greatly reduced.

In the multiprocessor constituted of processing units of differenttypes, input programs are parallelized and scheduled to minimizeexecution time, and system frequency control and power supply managementare precisely executed for each processor unit. Therefore, powerconsumption can be optimized without degrading performance.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a multiprocessor system of a powersupply/frequency generation type according to an embodiment of thisinvention.

FIG. 2 is a block diagram of a power supply/voltage generation circuit.

FIG. 3 is a block diagram of a voltage step-down circuit.

FIG. 4 is a block diagram of a supply voltage selection circuit.

FIG. 5 is a block diagram of a clock generation circuit.

FIG. 6 is a block diagram of a clock pulse selector.

FIG. 7 is a block diagram of a multiprocessor system of a powersupply/frequency selection type, which is another example of themultiprocessor system, in which a power supply/voltage generationcircuit and a clock generation circuit are integrated.

FIG. 8 is a block diagram of a multiprocessor system having a frequencyand voltage control table in which frequency and voltage controlregisters of processor units is integrated, which is another example ofthe multiprocessor system.

FIG. 9 is an explanatory diagram showing an operation mode of aprocessor unit based on frequency and voltage control.

FIG. 10 a is an explanatory diagram showing an example of frequency andvoltage control of a local memory executed for each bank where the localmemory LM is constituted of a plurality of banks.

FIG. 10 b is an explanatory diagram showing an example of frequency andvoltage control of the local memory executed for each of a plurality ofaddress spaces of the local memory LM.

FIG. 10 c is an explanatory diagram showing an example of a frequencyand voltage control of the local memory executed for each of addressspaces set in a plurality of banks.

FIG. 11 is an explanatory diagram of power supply control when a localbus LBUS is constituted of a cross bar.

FIG. 12 is a configuration diagram of the local bus LBUS shown in FIG.11.

FIG. 13 is an explanatory diagram showing an operation mode of the localmemory LM based on frequency and voltage control.

FIG. 14 a is an explanatory diagram showing a frequency and voltagecontrol register format when the local memory LM is constituted of 4banks.

FIG. 14 b is an explanatory diagram showing a setting example of thefrequency and voltage control register format as in the case of FIG. 14a.

FIG. 14 c is an explanatory diagram showing another example of afrequency and voltage control register format in which the LM isconstituted of 4 banks and addresses are allocated for control targets.

FIG. 15 is an explanatory diagram showing an example of a format of thefrequency and voltage setting table shown in FIG. 8.

FIG. 16 is an explanatory diagram of a memory map of the entiremultiprocessor system showing mapping of the frequency and voltagecontrol register.

FIG. 17 a is an explanatory diagram showing an example of frequency andvoltage control register access in which a CPU 0 accesses a frequencyand voltage control register of a DSP 0.

FIG. 17 b is an explanatory diagram of an example of frequency andvoltage control register access showing an object code when the CPU 0accesses the frequency and voltage control register of the DSP 0.

FIG. 17 c is an explanatory diagram of an example of frequency andvoltage control register access showing an object code when thefrequency and voltage control register is operated by using anapplication programming interface or API of an operating system.

FIG. 18 a is a macrotask graph of macrotask parallel executiondependency showing a concept of frequency and voltage control when tasksare processed in parallel.

FIG. 18 b is a Gantt chart when frequency and voltage control is notexecuted (i.e., FULL mode) showing the concept of frequency and voltagecontrol when the tasks are processed in parallel.

FIG. 18 c is a Gantt chart of an example of frequency and voltagecontrol when the CPU is continuously operated showing the concept offrequency and voltage control when the tasks are processed in parallel.

FIG. 18 d is a Gantt chart of an example of frequency and voltagecontrol when the CPU is temporarily stopped showing the concept of thefrequency and voltage control when the tasks are processed in parallel.

FIG. 19 a is a Gantt chart of a normal real-time process showingfrequency and voltage control during real-time restrictions.

FIG. 19 b is a Gantt chart of an example of frequency and voltagecontrol when the CPU is continuously operated showing the frequency andvoltage control during the real-time restrictions.

FIG. 19 c is a Gantt chart of an example of frequency and voltageexample when the CPU is temporarily stopped showing the frequency andvoltage control during the real-time restrictions.

FIG. 20 is a flowchart showing a compiler process.

FIG. 21 is a source code showing an example of an input program.

FIG. 22 is a diagram of a dependency relation among tasks generated bythe compiler.

FIG. 23 is a time-sequential chart showing a result of task/frequencyand voltage control scheduling.

FIG. 24 is an explanatory diagram showing an example of codes generatedby the compiler for the CPU 0, the DSP 0, a DRP 0, and DRP 1.

FIG. 25 is an explanatory diagram showing an example of codes generatedby the compiler for a CPU 1, a DSP 1, a BMP 0, and a BMP 1.

BEST MODES FOR CARRYING OUT THE INVENTION

An embodiment of this invention will be described below with referenceto the accompanying drawings.

<Entire Configuration of Embodiment>

FIG. 1 shows a configuration of a multiprocessor system according to anembodiment of this invention. In FIG. 1, the multiprocessor systemmainly includes a plurality of different types of processor units(hereinafter, referred to as PU) 10 to 17, and a shared memory(hereinafter, referred to as SM) 18 there among. The PUs 10 to 17 areconnected to a local bus (referred to as LBUS) 19 through bus interfaces(BIF) 27, respectively. The SM 18 is connected to the LBUS 19 to beaccessed from the PUs 10 to 17. A power supply voltage generationcircuit (DCGEN) 20 and a clock generation circuit (CLKGEN) 21 areconnected to the PUs 10 to 17 to supply a power supply voltage and asystem clock thereto. This multiprocessor system is a heterogeneousmultiprocessor system constituted of different types of processor units.

This embodiment shows an example in which types and numbers of PUs areconstituted of two general-purpose processors (hereinafter, referred toas CPU) 10 and 11, two digital signal processors (hereinafter, referredto as DSP) 14 and 15, two dynamically reconfigurable processors(hereinafter, referred to as DRP) 16 and 17, and two bit manipulationprocessor (hereinafter, referred to as BMP) 12 and 13. The types and thenumbers of PUs are not limited to those shown in this embodiment, butvarious configurations can be employed. A conventional configuration ofonly the same type of PU (e.g., constituted of four CPUs only) may beemployed. According to this embodiment, the DSPs (0 and 1) 14 and 15,the DRPs (0 and 1) 16 and 17, and the BMPs (0 and 1) 12 and 13 areaccelerator units, while the CPUs (0 and 1) 10 and 11 aregeneral-purpose processor unit.

The DRPs (Dynamically Reconfigurable Processors) 16 and 17 areprocessors which can dynamically reconfigure a processing circuitconfiguration and therefore a processing function, so that specificprocessing determined by the configuration can be executed in a morehighly efficient manner than CPUs.

Each of the PUs 10 to 17 includes a local memory (or cache) (LM) 24 fortemporarily storing a program or data to be processed by the PU, and asystem control register (R) 25 for executing frequency/power supplyvoltage (FV) control to decide a supply voltage (VL) and a systemfrequency (FL) to be supplied to the PU and synchronous control amongthe PUs. The local memory (LM) 24 is divided into an area in which aglobal address to be accessed from the other PU and the original PUhaving the LM is mapped, and an area in which a private address to beaccessed from the original PU only is mapped. The shared memory (SM) 18connected to the LBUS 19 has a global address mapped therein, and can beaccessed from the plurality of PUs. The application configuration ofthis invention is only an example, and this embodiment is in no waylimitative. For example, though not shown in FIG. 1, peripheral circuitssuch as input/output processing, interruption processing, a timer, and adebug circuit are to be connected to the LBUS 19 when necessary. Similaror different types of buses may be connected in a tiered manner though abus bridge.

The SM 18 shared by the PUs 10 to 17 includes a system control register(R) 181 for setting a supply voltage (VL) and a system frequency (FL) tobe supplied to the SM 18 to execute frequency and voltage (FV) control.The local bus LBUS 19 for interconnecting the PU and the SM includes asystem control register R 191 for setting VL and FL to be supplied tothe LBUS 19 to execute frequency and voltage control. In place of thissystem control register (R) 181, a frequency and voltage controlregister of the SM 18 and the LBUS 19 may be disposed in each of thesystem control registers (R) 25 of the PUs 10 to 17. The system controlregister (R) 181 is set by one of the PUs 10 to 17.

The PUs 10 to 17 are configured on one chip (LSI). However, a pluralityof LSIs constituting PUs 10 to 17 may be connected to configure one chipor module.

The SM 18 may be shared by each processor type (CPU, DSP, DRP, or BMP).For example, as described below with reference to FIGS. 10 a to 10 c, anarea of the SM 18 is divided into banks, and each bank can be shared byeach processor type. Alternatively, a part of the SM 18 may be shared bythe plurality of PUs.

<Voltage/Frequency Variable Circuit>

Next, configurations of the power supply voltage generation circuit(DCGEN) 20 and the clock generation circuit (CLKGEN) 21 connected toeach PU will be described.

FIG. 2 shows the configuration of the DCGEN 20. The DCGEN 20 includes acircuit (DCCNV) 206 for stepping down a normal power supply voltage (VD)22 supplied from the outside to a plurality of supply voltages (VL) 205designated beforehand, a supply voltage selection circuit (VDSEL) 203for selecting a voltage to be supplied to the PU from the plurality ofgenerated supply voltages, and a circuit (described below) for cuttingoff a power supply voltage.

The step-down (or boosting) circuit (DCCNV) 206 includes a plurality ofvoltage step-down units. For example, as shown in FIG. 2, it includes acircuit 22′ for directly supplying a power supply voltage VD, astep-down circuit (LVCNV) 201 for stepping down the power supply voltageto 3/4, and a step-down circuit (LVCNV) 202 for stepping-down the powersupply voltage VD to ½.

For the PUs 10 to 17, the supply voltage selection circuit (VDSEL) 203is controlled via a control line (DCCL) 204 by a FV (driving frequencyand driving voltage) mode set in the frequency and voltage controlregister in the system control register (R) 25 of each PU to select oneof a plurality of voltages generated by the step-down circuit (DCCNV)206, and the selected supply voltage VL is supplied to corresponding oneof the PUs 10 to 17. The frequency and voltage control register is to beset in a predetermined area in the system control register 25.

FIG. 3 shows the configuration of the circuit (LVCNV) for stepping downa power supply voltage. The step-down circuits LVCNV 201 and 202 of FIG.2 include a reference voltage generation circuit (VREF) 207 for decidinga supply voltage (¾ VD), and a power supply generation circuit (VGEN)208 for stepping-down a voltage to a voltage designated by a referencevoltage and supplying a current to the PU, and an output of the powersupply generation circuit 208 is input to the supply voltage selectioncircuit 203 of FIG. 2.

An output voltage (VCNV) of the step-down circuit LVCNV is decided bythe number of stages of an nMOSFET in the reference voltage generationcircuit (VREF) 207 for deciding a reference voltage, and a configurationof the LVCNV is decided to supply a voltage designated by the frequencyand voltage control register. A voltage designated via the control line204 from the PU is selected from a plurality of voltages stepped down bythe above-mentioned circuit to be output to each of the PUs 10 to 17(205).

FIG. 4 shows an example of a configuration of the supply voltageselection circuit (VDSEL) 203. The supply voltage selection circuit(VDSEL) 203 includes a control signal decoding unit 2031 and a voltageselection switch 2032.

By inserting an nMOSFET 209 of a high threshold value into the sourcevoltage supply unit of the PU, a leakage current flowing during thepower cutoff of the PU can be reduced. Each of the configurations ofFIGS. 3 and 4 is only one configuration for realizing a function of thestep-down circuit LVCNV, and other various power supply voltagegeneration circuit may be applied.

Next, referring to FIG. 5, an example of a configuration of the clockgeneration circuit (CLKGEN) 21 will be described. The CLKGEN 21 includesfrequency division circuits 212 and 213 for reducing an internal clockFC (23) to an integral submultiple, such as ½ or ¼ of the internalclock, and a clock pulse selector (CLKSEL) 214 for selecting a clock(FL) 216 to be supplied to the PU from a plurality of frequency-dividedclocks. The internal clock FC (23) is generated by multiplying a systemclock input from the outside by a designated multiplication rate at aphase locked loop (PLL) circuit 211.

FIG. 6 shows an example of a configuration of the clock pulse selector(CLKSEL) 214. The CLKSEL 214 includes a decoding unit 2171 of an inputcontrol signal CKCL and a clock signal selection unit 2172. For each PU,an FL designated from a plurality of generated clocks is selected bycontrolling the DCSEL 214 via a control line (CKCL) 215 by the frequencyand voltage control register mode of the PU, and the clock FL 216 issupplied.

In addition to the configuration of FIG. 1, as shown in FIG. 7, aconfiguration may be employed in which each circuit (DCCNV 206 and CLKCV217) for converting power supply voltages and clock pulses is added tothe plurality of PUs (or entire PU), and circuits (VDSEL 203 and CLKSEL214) for selecting plural types of power supply voltages and clockpulses generated on the PU sides are added. The example of FIG. 7 showsa case in which two sets of power supply voltage generation circuits 206and clock generation circuits 217 supply power and clocks to four PUs.

Accordingly, the circuits for generating power supply voltages and clockpulses can employ various configurations, and the configurations are notlimited to the above. For example, a configuration can be employed inwhich one circuit DCCNV 206 for converting a power supply voltage isadded to the plurality of PUs (or entire PU), and a circuit CLKCNV 217for generating a clock pulse is added to the PU side for each PU.Alternatively, for example, a configuration can be employed in which onecircuit CLKCNV 217 for generating a clock pulse is added to theplurality of PUs (or entire PU), and a circuit DCCNV 206 for convertinga power supply voltage is added to the PU side for each PU.Alternatively, for example, a configuration may be employed in which aDCCNV 206 is not mounted in the chip, plural types of power supplyvoltages generated outside the chip are input, and a desired supplyvoltage VL 205 is selected and supplied by the VDSEL.

As means for setting the frequency and voltage control mode, in additionto the configuration of FIG. 1 or 7 in which each PU has the frequencyand voltage control register (system control register (R) 25) forexecuting frequency and voltage control of the PU, a configuration maybe employed in which a frequency and voltage control table (FVTBL) 26for holding the frequency and voltage control modes of the PUs 10 to 17in block is connected to the LBUS 19 as shown in FIG. 8. In FIG. 8, thefrequency and voltage control register included in the system controlregister 25 of FIG. 1 is integrated as the frequency and voltage controltable 26 connected to the local bus LBUS 19.

The frequency and voltage control table (FVTBL) 26 can be accessed fromeach of the PUs 10 to 17, and may be set in a part of the shared memorySM or constituted of a memory (or register) independent from the sharedmemory SM.

<Bus IF>

As described above, since the power supply voltages can be individuallyset for the PUs 10 to 17, a signal voltage level varies between the PUsand the LBUS 19 connected to the PUs. Accordingly, the bus interface(BIF) 27 connected between the PUs 10 to 17 and the LBUS 19 includes asignal level conversion circuit (not shown) to convert a signal levelbetween the bus LBUS 19 and the PUs 10 to 17.

<Setting of Voltage/Frequency Mode for PU>

Next, a hardware mechanism for deciding a power supply voltage (VL) 205and a system clock (FL) 216 generated by the power supply voltagegeneration circuit (DCGEN) 20 and the clock generation circuit (CLKGEN)21 will be described.

Operation modes (VL and FL values to be supplied) of the power supplyvoltage generation circuit DCGNE 20 and the clock generation circuitCLKGEN 21 are decided beforehand during designing, and each PUdesignates the circuit via a control line DCCL or CKCL based on a valueof the frequency and voltage control register of the PU. A settingmethod of VL and FL will be described below in detail. The compilergenerates a control code for setting a frequency and voltage controlregister, and the general-purpose processor CPU 0 or the CPU 1 forexecuting the code accesses the memory-mapped frequency and voltagecontrol register to rewrite the value.

According to this embodiment, the FV mode of the PUs 10 to 17 is set byfour stages of VL and FL combinations (2 bits in frequency and voltagecontrol register). FIG. 9 shows an operation mode list of the PUs 10 to17. An OFF mode voltage/frequency cutoff of VL=0 and FL=0 is set when avalue of 2 bits of the frequency and voltage control register is “00”,and a FULL mode equal to a power supply voltage at VL=VD and equal to asystem frequency at FL=FC is set when a value of the register is “11”.

A LOW mode of VL=(½) VD and FL=(¼) FC is set when a register value is“01”. A MIDDLE mode of VL=(¾) VD and FL=(½) F is set when a registervalue is “10”. The number of VL/FL modes and a VL value/FL value aredecided based on a form or an application of a system to be built, aprocess technology to be used, or the like.

<Partial Frequency and Voltage Control in PU>

It has been described the case where all the PUs are targeted for thefrequency and voltage control, and the frequency and voltage controlmode is set for the PUs altogether. However, different frequency andvoltage control modes may be set for the local memories (LM) and thefrequency and voltage control registers to be mounted in the PUs 10 to17, and other peripheral circuits to the processor. This can be realizedby expanding the bit fields of the frequency and voltage controlregisters and providing fields to set frequency and voltage controlmodes corresponding to parts to be subjected to frequency and voltagecontrol. For example, a mechanism of independently setting FL and VL maybe employed for circuits such as a local memory LM and a system controlregister (R) 25 whose data must be held. In other words, by executingfrequency and voltage control for the local memory LM and the frequencyand voltage control register independently, the data of the LM and the Rare held even when the FV of the PU is cut off, and the LM of the PU canbe accessed from another PU even when the target PU is cut off.

A plurality of frequency and voltage control targets can be set due tothe configuration of the local memory LM. Each of FIGS. 10 a to 10 cshows a frequency and voltage control system for the local memory LM.

For example, as shown in FIG. 10 a, a bank configuration is employed forthe local memory LM, and frequency and voltage control is carried outfor each bank (i.e., banks 0 to 3). Accordingly, a supply voltageselection circuit (VDSEL) 203 is connected to each of the banks 0 to 3.

In other words, a normal voltage or a minimum voltage necessary forholding data is supplied to a bank whose data must be held while powersupplies to the banks other than the bank are cut off to thereby savethe power. At the same time, since it is not necessary to save data,return from the PU power cut-off time to the normal operation time canbe made at a high speed.

As shown in FIG. 10 b, the address space of the local memory LM isdivided into certain continuous address spaces (i.e., areas 1 to 4) andfrequency and voltage control is carried out by the space units.Accordingly, power consumption can be reduced by cutting off powersupplies to unnecessary address spaces (i.e., storage areas).

Therefore, the supply voltage selection circuit (VDSEL) 203 is connectedfor each of the address spaces (i.e., areas 1 to 4) of the local memoryLM.

As shown in FIG. 10 c, in the case of the bank configuration of thelocal memory LM, frequency and voltage control is carried out for eachunit of the local memory LM divided by certain continuous address spaces(i.e., areas 1 to 4) across the banks (i.e., banks 0 to 3).

Accordingly, the supply voltage selection circuit (VDSEL) 203 isconnected for each of the address spaces (i.e., areas 1 to 4) over thebanks 0 to 3 of the local memory LM. With this configuration, low powerconsumption can be realized while utilizing the bank configuration torealize memory interleaving for achieving a high speed of memory access.

The local memory LM may be divided into a part to be accessed from thePU alone having the LM functionally mounted thereon (i.e., unsharedmemory) and a part to be accessed from not only the PU but the other PUs(i.e., distributed shared memory) to be mounted, and frequency andvoltage control may be carried out for each of the above two memoryfunction units. Accordingly, though not shown, the supply voltageselection circuit (VDSEL) is connected for each of the unshared memoryand the distributed shared memory areas.

The memory division methods shown in FIGS. 10 a to 10 c can similarly beapplied for various memories or functional part units such as the memoryfunction units and the shared memory SM mounted in the system. Forexample, a configuration of a plurality of banks may be employed for theshared memory SM arranged outside of the PU, and frequency and voltagecontrol may be separately carried out corresponding to accessfrequencies to the banks and a system state (e.g., standby or sleepstate).

For example, the configuration of FIG. 10 a is applied to the sharedmemory SM 18 in place of the local memory LM, in which the shared memorySM 18 is divided into banks (i.e., banks 0 to 3) and the supply voltageselection circuit (VDSEL) 203 is connected to each bank, to therebyexecute power control for each bank units. Alternatively, theconfiguration of FIG. 10 b is applied to the shared memory SM 18 inplace of the local memory LM, in which the address space of the sharedmemory SM 18 is divided into certain continuous address spaces (i.e.,areas 1 to 4) and frequency and voltage control is executed for eachspace units to cut off power supplied to the unnecessary address spaces,to thereby reduce power consumption. Also, the configuration of FIG. 10c is applied to the shared memory SM 18 in place of the local memory LM,in which frequency and voltage control (i.e., power control) can becarried for each unit of the shared memory SM 18 divided by certaincontinuous address spaces (areas 1 to 4) across the banks (i.e., bank 0to 3). It should be noted that the structure shown in FIGS. 10 a to 10 care applied to the shared memory SM 18, “LM” shown shall be interpretedas “SM”.

<Frequency and Voltage Control Mode for Local Memory LM>

As an example where frequency and voltage control targets are aplurality of parts (i.e., functional parts) in the PU, a method ofexecuting frequency and voltage control for the local memory LMindependently of the PU will be described below. According to theexample, the local memory LM is constituted of four banks (i.e., banks 0to 3) as shown in FIG. 10 a, and the PU and each LM bank are targetedfor frequency and voltage control.

A frequency and voltage control mode of the PU is as shown in FIG. 9.FIG. 13 shows a list of frequency and voltage control modes of the localmemory LM. As a memory is targeted for the operation mode of LM,according to this embodiment, three operation modes provided as theoperation modes of LM, i.e., a normal operation mode (in which VL=VD,FL=FC, and register value is “11”) capable of normal memory accessingand data holding, a data holding mode (in which VL=½ VD, FL=0, andregister value is “01”) inhibited from accessing the memory butpermitted to hold data, and a power supply cutoff mode (in which VL=0,FL=0, and register value is “00”) for completely cutting off powerwithout holding data.

FIG. 14 a shows a format of a frequency and voltage control registercorresponding to frequency and voltage control of each bank, where thelocal memory LM is constituted of a plurality of banks as shown in FIG.10 a or 10 c. According to the example, for each of the PUs 10 to 17, afrequency and voltage control register 1250 is mapped in one memoryaddress, and a frequency and voltage control mode is decided for eachcontrol target in its field (i.e., mapped address). When one fieldincludes 32 bits as shown in the drawing, i.e. with bits 1 and 0 set fora frequency and voltage control mode of the PU (PUFV), bits 3 and 2 setfor a frequency and voltage control mode of an LM bank 0 (LMOFV), bits 5and 4 set for a frequency and voltage control mode of an LM bank 1(LM1FV), bits 7 and 6 set for a frequency and voltage control mode of anLM bank 2 (LM2FV), and bits 9 and 8 set for a frequency and voltagecontrol mode of an LM bank 3 (LM3FV), a desired field is accessed, andan operation mode of the local memory LM is decided from the table ofFIG. 13 to execute frequency and voltage control. It should be notedthat an operation mode of the PU is decided based on the table of FIG.9.

FIG. 14 b shows a setting example of the frequency and voltage controlregister 1250. According to the example, for the PU mode, MIDDLE (i.e.,“1, 0”) is set in the PUFV of FIG. 14 a, “1, 1” is set in the LM0FV toactivate only the bank 0 of the local memory LM thereby executing anormal operation, “1, 0” is set in the LM1FV to set a data holding modein the bank 1 of the LM, and “0, 0” is set in the LM2FV and LM2FV of thebanks 2 and 3 to cut off power.

In addition, a configuration may be employed where an address isallocated to the frequency and voltage control register for each controltarget. For example, FIG. 14 c shows a format of the frequency andvoltage control register where a register is mapped in a memory addressfor each frequency and voltage control target. In FIG. 14 c, PUFV andLMOFV to LM3FV indicating the control frequency and voltage controlmodes of the PU and the LM are stored in order of addresses.

As shown in FIG. 14 a, when the frequency and voltage control mode ofthe control target is switched by a bit field of the frequency andvoltage control register, bit calculation is necessary to set a value ofthe field. In the configuration of FIG. 14 c, however, it is onlynecessary to directly access the address where the control targetregister is directly mapped, and thus the number of commands regardingfrequency and voltage control register setting can be reduced. On theother hand, more address resources are necessary as compared with FIG.14 a.

Described above is the example where the frequency and voltage controlmodes of the PU and the LM are set by setting the frequency and voltagecontrol register of each PU. However, as described above referring toFIG. 8, when the frequency and voltage control registers indicating thefrequency and voltage control modes of the PUs 10 to 17 are provided asthe frequency and voltage control tables (FVTBL) 26 connected to thelocal bus LBUS 19, the FVTBL is configured as shown in FIG. 15.

FIG. 15 shows a format of the frequency and voltage control table FVTBLof FIG. 8. One line of the FVTBL corresponds to a PU number (i.e., PUN250), a frequency and voltage control mode of the PU (i.e., PUFV 251),frequency and voltage control modes of the LM (i.e., LM0FV 252, LM1FV253, LM2FV 254, and

LM3FFV 255), and a frequency and voltage control mode (i.e., BUSFV) ofthe local bus LBUS described below, and FV operation modes of the PU, LMand LBUS can be decided for an optional PU.

Then, the CPU 0 or the like reads the frequency and voltage controltable FVTBL to decide frequency and voltage control modes of the PU, thelocal memory LM (for each bank), and the local bus for each of the PUs10 to 17, and controls the voltage generation circuit (DCGEN) 20 and theclock generation circuit (CLKGEN) 21.

<Power Supply Control for Bus>

For the local bus (LBUS) 19 interconnecting the PUs 10 to 17, a powersupply can be partially controlled (i.e., power supply can be cut off)as frequency and voltage control for the functional part units of themultiprocessing system.

For example, when power is cut off during non operation of one of thePUs 10 to 17, the bus interface (BIF) of the PU is not accessed.Accordingly, power of the BIF can be cut off with the result that aleakage current is reduced. When a bus configuration is a cross bar,power of the switch for deciding a bus to be connected to the PU can becontrolled and cut off.

FIG. 11 shows a concept of the power supply control for the bus of thecrossbar configuration. For example, presuming that the DSP 0 (14) isset in a power-cutoff state, and there is no communication traffic forthe DSP 0, power supplies are also cut off for a BIF (27) accompanyingthe DSP 0, and a switch group (192) for connecting a bus network fromanother PU and the shared memory SM to the DSP 0.

Therefore, it is possible to reduce power consumption of the switchgroup 192 of the DSP 0 set in an unoperated state.

FIG. 12 shows a circuit configuration for realizing power supply controlfor the cross-bar network. FIG. 12 shows a configuration where the CPU0, the DSP 0, and the DSP 1 are connected to the local bus LBUS 19constituted of the cross-bar network. This circuit includes a networkcontrol unit NWCRL for analyzing packet data sent from the PUs 10 to 17and controlling the switch group 192 shown in FIG. 11, and a networkswitch unit (NWSW) for connecting a sending source of the packet data toa network of a sending destination.

The network control unit NWCRL includes an SHCTL 195 for decidingpriority of packet processing by analyzing the packets sent from the PUs10 to 17, a selector (SELC) 196 that selects the packets for whichpriority has been decided by the SHCTL 195, a queue 197 for temporarilyholding the packets, and an SWCTL 198 for controlling selector switches191 to 194 for connecting the network of the sending destination and thesending source by analyzing the packets.

The network switch NWSW includes the selector switches (SEL) 191 to 194for connecting the network among the PUs.

The PUs 10 to 17 and the network control unit NWCRL each include switch(DSCEL) 199 disposed to be selectively connected to the power supplygeneration circuit DCGEN. Power is supplied from the switches (DCSEL)199 to the PUs 10 to 17, and to the selector switches 191 to 194 towhich the PU is connected.

For example, presuming that the DSP 0 is set in a power-cutoff state andno communication traffic occurs in the DSP 0, the switch DCSEL 199 addedto the DSP 0 cuts off power supply not only to the DSP 0 but also to theBIF 27 connected to the DSP 0 and the selector switch SEL1 (192) forselecting the network to the DSP. Accordingly, it is possible to furtherreduce power consumption by cutting off power supply not only to the DSPof the power-cutoff state but also to the peripheral circuits. When theentire network is set in a standby state, i.e., in a power-cutoff state,power supply to the NWCRL is also cut off by the switch DCSEL 199 forsupplying power to the NWCRL.

<Method of Setting Frequency and Voltage Control Register>

Next, a specific method of setting the frequency and voltage controlregister 1250 will be described. The description will be made byconfiguring the register format as shown in FIG. 14 a.

A global address to be uniquely accessed from all the PUs is allocatedto the frequency and voltage control register of each PU. A taskmanagement PU (i.e., PU for an executing scheduler or an operatingsystem) predetermined by the compiler accesses the address, and sets afrequency and voltage control mode by changing a value of the register.

FIG. 16 shows a global address space map of the entire multiprocessingsystem. According to this embodiment, an area where PUs own localresources (system setting register including the LM, and the frequencyand voltage control register 1250) are viewed, and a broadcast (BC) areaare defined from a head address to a predetermined address. The BC areawill be described later. An address space is allocated for each PU afterthe BC area, and a local memory LM address and a system setting registeraddress is allocated to the address space in each PU. The frequency andvoltage control register has one of the system setting registeraddresses to access, to thereby set a frequency and voltage control modecan be set by accessing the address. In FIG. 16, addresses are mappedfrom the head space in order of the CPU 0, the CPU 1, the DSP 0, and theDSP 1, and, for example, when a frequency and voltage control registerof the DSP 0 is set, an address “DSP 0_FVREG_ADRS” is accessed. Anaddress of the shared memory SM is allocated after the area of each PUin the space.

Frequency and voltage control register setting is carried out byexecuting a register access object code through the task management PUdecided by the compiler, and by accessing the frequency and voltagecontrol register of a control destination PU via the local bus LBUS 19.A specific method by which the compiler generates the object code willbe described later. To simply explain, in allocating tasks to theplurality of PUs, the compiler groups the plurality of PU groups, anddetermines a task management PU for starting the tasks of the group orexecuting synchronous processing. The compiler generates a code forexecuting frequency and voltage control in the management PU, and themanagement PU executes the code to carry out frequency and voltagecontrol of the PU in the group. The compiler is executed by a computer(not shown).

FIG. 17 a shows an example of setting a frequency and voltage controlregister. It is presumed that the compiler groups the CPU 0, the DSP 0,and the DSP 1, the CPU 0 executes task management, and the CPU 0executes frequency and voltage control for the DSP 0. The CPU 0 executesthe object code generated by the compiler to execute FV setting to set afrequency and voltage control mode of the DSP 0.

FIG. 17 b shows an example of an object code for setting the frequencyand voltage control mode of the DSP 0. According to the example, anaddress of the frequency and voltage control register in the DSP 0 ispredefined, the address of the frequency and voltage control registerand a FV setting value are transferred to the general-purpose registerin the CPU 0, and the setting value is written in a register designatedby the address, thereby completing the setting.

According to the FV setting method, the object code by which the taskmanagement PU directly accesses the register is executed. Alternatively,as shown in FIG. 17 c, when the operating system (hereinafter, referredto as OS) manages the FV operation mode of each PU, by calling afrequency and voltage control API of the OS, frequency and voltagecontrol mode setting of the PU can be carried out under control of theOS.

It is also possible to provide a mechanism in which a frequency andvoltage control register is set in the entire system and registers forsetting frequency and voltage control modes of all the PUs 10 to 17 areset in the register such that FV modes are set to all the PUs 10 to 17once modes are set in the registers. For example, as shown in thefrequency and voltage control table 26 of FIG. 8, a register shared byall the PUs 10 to 17 are provided, such that the frequency and voltagecontrol modes of all the PUs 10 to 17 can be changed by updating theregister.

A plurality of frequency and voltage control registers may be providedin the control register of the entire system to set an FV mode for eachtype of PU in synchronization, depending on the types of processors suchas a general-purpose processing PU group (CPU) or a dedicated processingPU group (DSP, DRP, and BMP). In this case, frequency and voltagecontrol registers are provided for each type of processors in thefrequency and voltage control table 26 of FIG. 8 and the frequency andvoltage control register is shared among the CPU, the DSP, the DRP, andthe BMP, thereby making it possible to change the frequency and voltagecontrol mode for each type of processor by changing one register.

<BC Area>

Next, the broadcast (BC) area disposed in the head area of the memorymap of FIG. 16 will be described. The BC area is a write-only area. Whenone PU writes data in one address of the BC area, the data issimultaneously written in LM entries of all the PUs correlatedbeforehand to the address via the local bus LBUS 19. Accordingly, thedata shared by all the PUs is simultaneously held by the local memoriesLM of the PUs, and the PUs 10 to 17 can access the data of the LM at ahigh speed without accessing the shared memory SM.

Even in the case of executing system control such as frequency andvoltage control, the broadcasting is carried out, thereby making itpossible to simultaneously transmit control information to all the PUs.At this time, broadcasting mask information for designating a PU rangemay be transmitted together, to thereby realize a broadcast function oftransmitting data or control information by limiting the PU range. As aresult, for example, when the compiler defines a PU group constituted ofa plurality of PUs to process tasks in parallel, task processing can besimultaneously started or frequency and voltage control can be executedin the PU group, thereby improving throughput of the entire system.

<Frequency and Voltage Control Concept during Task Processing>

Next, referring to FIGS. 18 a to 18 d, a concept of a power supplyvoltage and system frequency (FV) control method during task processingat the PUs 10 to 17 will be described. A task program executed at eachPU is generated from an input program by a compiler described below. Inother words, in the input program, a structure of the program is firstanalyzed by the compile described below, and divided, as macrotasks(MT), statement blocks of large grain sizes such as a basic block (BB),a repetition block (RB), and a subroutine (SB) which are constituted ofassignment statements alone. According to the example, the structure isdivided into three macrotasks MT 301 to MT 303. The macrotask isobtained by dividing the input program (i.e., source code) into aplurality of grain size unit blocks. In other words, through thedivision into the macrotasks, a multigrain parallel process is carriedout to execute parallel processing by combining macrodata flowprocessing using parallel processing among rough grain size tasks suchas subroutines and middle grain size parallel processing, which is looplevel parallel processing, with near-fine grain size parallel processingusing statement level parallelism in the basic block, in a tieredmanner. According to this embodiment, program components and macrotaskcomponents are allocated to the PUs 10 to 17 as macrotasks and tasks,respectively.

Subsequently, by calculating characteristic information on calculationcosts or the like at an optional PU of the macrotask MT, a PU in whichthe macrotask MT should be executed is decided, and data dependency andcontrol dependency among the macrotasks MTs are analyzed to decideexecution order of tasks.

FIG. 18 a is a macrotask graph showing coarse-grain task parallelism.This graph shows that macrotasks MT 1 (301) and 2 (302) can besimultaneously executed, and a macrotask MT 3 (303) can be executedafter an end of the execution of the macrotasks MT 1 (301) and 2 (302).According to the example, the macrotask MT 1 is arranged in the PU 10(i.e., CPU 0), the macrotask MT 2 is arranged in the PU 12 (i.e., BMP 0)12, and the macrotask MT 3 is arranged in the PU 10 (i.e., CPU 0).

FIG. 18 b is a process Gantt chart when the macrotasks thus scheduledare normally processed (with no voltage/frequency control).

In FIG. 18 b, as the macrotasks MT 1 and MT 2 can be executed inparallel, the MT 1 and the MT 2 are simultaneously started to beprocessed (305) (306) by the CPU (i.e., CPU 0) and the BMP (i.e., BMP0), respectively. During normal processing, voltages supplied to the CPUand the BMP are both normal VD, and a normal FC is supplied as a systemfrequency. According to the example, as the number of processing cyclesof the macrotask MT 1 at the CPU is smaller than that of the macrotaskMT 2 at the BMP, the processing of the macrotask MT 1 (305) at the CPUis finished before the processing of the macrotask MT 2 (306) at the BMPis finished.

The CPU, which has finished the processing (305) of the macrotask MT 1,next processes the macrotask MT 3 (307). However, because of adependency relation among the macrotasks MTs, the macrotask MT 3 to beprocessed next at the CPU cannot be executed until the end of theprocessing of the MT 2 (306) at the BMP. Therefore, the CPU is set in anidle state until the processing of the macrotask MT 2 is finished at theBMP. Even during the idle state, the normal power supply voltage VD andthe clock FC is being supplied to the CPU, which leads to extra powerconsumption.

As one method for solving the problem, when the CPU executes themacrotask MT 1, the CPU is driven in a LOW mode (i.e., mode of supplying¼ FC of FIG. 9) for reducing a system frequency of the CPU from that ofa normal time (i.e., FULL mode) (308) so as to make time necessary forthe BMP to process the macrotask MT 2 equal to the processing time ofthe macrotask MT 1 executed by the CPU. In other words, while the BMP isdriven in the frequency and voltage control mode at FULL of the normaltime, the frequency and voltage control mode of the CPU is set to a LOWmode, a system frequency of the PU whose processing is finished first isreduced, and a frequency and voltage control register is set so thatdifferent frequency and voltage control modes are set among the PUswhich execute parallel processing. FIG. 18 c is a Gantt chart when thefrequency and voltage control of this method is applied. The compilerestimates the number of processing cycles of the macrotask MT 1 at theCPU (CPU 0) and the number of processing cycles of the macrotask MT 2 atthe BMP (BMP 0) to decide system frequency of the CPU so that processingtimes of both can be equal. As a result, since the system frequency ofthe CPU is reduced, a power supply voltage VL to the PU can also bereduced, thereby optimizing power consumption.

In other words, according to this example, for the macrotask MT 1, thefrequency and voltage control mode of the CPU is set to the “LOW mode”of FIG. 9, and the frequency and voltage control mode of the BMP whichexecutes parallel processing is set to “FULL”.

As another method of solving the idle state of the CPU of FIG. 18 b, atthe end time of the processing of the macrotask MT 1 at the CPU (309),the supply of the power supply voltage and the system clock of the CPUare cut off to set a standby state (310). In other words, when the CPUcompletes the processing of the macrotask MT 1, the frequency andvoltage control mode of the CPU is set to “OFF” of FIG. 9. Then, at thestart time of the macrotask MT 3, the frequency and voltage control modeis set to “FULL” to resume the processing. FIG. 18 d is a Gantt chartwhen the frequency and voltage control of this method is applied.

In FIG. 18 d, the processing of the macrotask MT 1 of the CPU isfinished before the macrotask MT 2 of the BMP (306) is finished.However, at the end time, the CPU is set in a standby state (OFF), anormal power supply voltage and a normal system clock are supplied toreturn the CPU to the normal state when the BMP finishes the processingof the macrotask MT 2 (306), and processing of the macrotask MT 3 (307)is started. As a result, as the operation is stopped without setting theCPU to be idle, power consumption can be reduced.

Accordingly, when the programs (i.e., tasks) are compiled, the compilerestimates processing times beforehand based on the configuration of thePU, decides processing order beforehand regarding parts whose processingorder can be statically decided during compiling, and executes precisesystem frequency control and power management for each PU. Hence, powerconsumption can be optimized without reducing performance of themultiprocessing system.

<Concept of Frequency and Voltage Control during Task Processing(Real-time Regulations)>

The FC control method in the case where execution conditions of themacrotask (MT) depends on the other macrotasks MTs has been described.It is also possible to provide another frequency and voltage controlmethod targeting a real-time processing task having restrictions to beprocessed within a certain time, i.e., a processing time limit (i.e.,allowance time) of the task is predetermined as shown in FIG. 19 a.

When a macrotask (MT 1) 311 of FIG. 19 a is processed in the “FULL”mode, in other words, when processed by a CPU operated by a normal powersupply voltage and a normal system frequency, the processing is finishedprior to a processing time limit (i.e. deadline). In this case, as thereis still allowance for the original processing time limit while the CPUis set in an idle state at the end time of the processing, a systemfrequency of the CPU can be reduced within the processing time limit(312).

FIG. 19 b is a Gantt chart in the case where the frequency and voltagecontrol of this method is applied. The compiler estimates a systemfrequency to enable completion of the processing within the processingtime limit, and decides a frequency and voltage control mode of the CPUto be a “LOW” mode as shown. As a result, a supply voltage VL can bereduced to optimize power consumption.

Similarly, by cutting off the power supply and the system clock of theCPU (314) at the end time of the processing (313) of the macrotask MT 1,power consumption may be reduced. FIG. 19 c is a Gantt chart when thefrequency and voltage control of this method is applied. In this case,the CPU processes the macrotask MT 1 in the “FULL” mode, and completesthe processing within the processing time limit. However, the operationmode is set to “OFF” when the macrotask MT 1 is completed, to therebysave useless power consumption.

<Processing Flow of Compiler>

Next, a compiling method for generating codes to execute schedulingaccording to characteristics of the processor unit (PU) and powerconsumption optimization control based on a dynamic voltage/frequencychange in the aforementioned multiprocessor architecture, and processingof the compiler employing the method will sequentially be described.FIG. 20 shows a processing flow of the compiler 40 employing the method.

<Generation of Macrotask>

An input program 400 of a sequential structure described in high-levellanguage such as C or Fortran first analyzes the program structure to bedivided into three kinds of coarse-grain macrotasks (MT) of a repetitionblock (RB), a subroutine (SB), and a block of pseudo assignmentstatements (BPA) to generate macrotasks (401). The RB is a loop block,and an outermost loop in each tier, the BPA is a block obtained bycombining or dividing a plurality of basic blocks constituted ofassignment statements with consideration given to scheduling overhead orparallelism. FIG. 21 shows an example of the input program (i.e., sourceprogram 400).

<Directive Designation>

In the source program 400, PU allocation can be described beforehand.For example, allocation of a given subroutine to the DSP and a givensubroutine to the CPU can be explicitly designated. As a result, the DSPsubroutine is subjected to further parallelism analysis by the compiler40, and when there are four DSPs, for example, the compiler 40 executesparallelization scheduling for the four DSPs.

<Data Dependence/Control Flow Analysis>

Subsequently, a control flow and data dependency among the divided andgenerated tasks is analyzed, and an execution order relation of themacrotasks MTs is extracted (402). As the input program 400 of FIG. 21is sequentially described, execution codes generated by the normalcompiler 40 are executed in sequential order as in the case of thestructure of the program. However, in many cases, it is not alwaysnecessary to execute the codes in the described order in terms of therelationship among the macrotasks MTs.

In other words, when there is no dependency of control or data referenceamong the macrotasks MTs, especially in the multiprocessor system, it isimportant to execute scheduling simultaneously or changing the order byarranging a plurality of macrotasks MTs in a plurality of PUs to shortenthe overall execution time.

To execute such scheduling, parallelism among the MTs must be analyzed.As a preparation for this analysis, an execution order relation amongthe macrotasks MTs is extracted by a data dependence/control flowanalysis process 402.

<Loop Level Parallelism Analysis>

Subsequently, as middle grain size level parallelism analysis in themacrotask MT, loop level parallelization is carried out (403). In theloop level parallelization 403, data dependency among loop repetition(i.e., iteration) units is analyzed to determine whether each iterationcan be independently processed or not. If each iteration can beindependently processed, iterations are allocated to the plurality ofPUs to be subjected to parallel processing.

Loop parallelization is realized by various methods, e.g., dividing asingle loop into a plurality of loops to increase parallelism, copyingdata or expanding arrangement variables to delete data dependency amongthe loops thereby realizing parallelization, and combining a pluralityof loops into a single loop to reduce overhead necessary for loopcontrol.

<Processing Cost Analysis>

Next, processing cost analysis is carried out to estimate a processingcycle necessary when the generated macrotask MT is executed at each PU(404). For a method of estimating processing costs (i.e., calculationcosts), for example, regarding the CPU the following can be adopted.That is, the number of cycles necessary at a command level such asmultiplication or addition is held as profiling information in aprocessing cost table 420 and the number of sequential processing cycleswhen the macrotask MT is executed at the PU is estimated with referenceto the table 420.

When it is difficult to estimate the number of cycles at an object-codelevel in such devices as the DRP or the DSP which handles multipleamount of data with one command, each local compiler generating anobject code of the device is called by the compiler 40 and estimatesexecution cycles on the converted execution codes by the local compiler(413). The local compiler is preset corresponding to a type of a PU. Forexample, DSP local compiler profiling information is used in the case ofthe DSP, and DRP local compiler profiling information is used in thecase of the DRP.

When a branch is included, or when a size of a loop or a size of anarray cannot be determined before the execution of the macrotask MT,profiling may be once executed on supposed execution environment tocalculate processing costs with increased accuracy. When this profilingis not executed but the macrotask MT includes a branch, cost calculationis carried out with a branch probability of 50%. Similarly, when theprofiling is not executed and the number of loop iterations cannot bedetermined, a method in which the loop iteration number is set to afixed number of times or the defined size of an array used in the loopis applied.

The processing costs have been defined as the number of processingcycles (time). However, it is also possible to define costs as powerconsumption, and carry out scheduling such that power consumption can bereduced to minimum. For example, an operation mode capable of reducingpower consumption to minimum within the processing time limit isselected from among frequency and voltage control modes (frequency andsystem voltage) to be set, based on the number of processing cycles andthe processing time limit to complete the macrotask MT. Alternatively,as power consumption of the PU can be estimated by the followingequation:

power consumption=system voltage (to the power of)2×driving frequency,

a combination of frequency and voltage control modes capable of reducingpower consumption to minimum within the processing time limit may beselected to execute scheduling. For example, processing is executed byonly the LOW mode as shown in FIG. 19 b, or a plurality of frequency andvoltage control modes are combined as shown in FIG. 19 c. Alternatively,it is possible to select a combination of frequency and voltage controlmodes with which processing time is minimum and power consumption isminimum.

<Intermacrotask Parallelism Analysis or Earliest Execution ConditionAnalysis>

After the processing costs of the macrotask MT have been determined, thecompiler 40 determines parallelism among the macrotasks MTs, i.e., acondition (earliest execution condition) which permits execution of eachmacrotask MTG at the earliest, based on the result of simultaneouslyanalyzing the control flow and the data dependency among the macrotasksMTs extracted by the data dependence/control flow analysis process 402(405).

The earliest execution condition is visibly shown in a macrotask graph(MTG). FIG. 22 shows MTGs generated by analyzing the input program ofFIG. 21. The result of parallelism analysis among the macrotasks is heldas a macrotask graph table 421 in an external storage device to be usedfor a compiling process of a rear stage. This external storage device isa computer (not shown) for executing the compiler 40.

<Macrotask Graph>

Referring to FIG. 22, the macrotask MTG will be described below. Eachnode of the graph indicates a macrotask MT, a solid line between thenodes indicates a data dependency relation between the macrotasks, abroken line between the nodes indicates a control dependency relationbetween the macrotasks, and a small circle in the node indicates acondition branch. For example, solid lines extend from a macrotask MT1_1 (501) to MT 1_2 (502) and to MT 1_3 (503). These lines indicate adependency relation that processing is carried out by using datagenerated as a result of executing the MT 1_1 by the macrotasks MTs 1_1and MT 1_3. Accordingly, as an execution order, the MT 1_2 and the MT1_3 can be executed after the end of execution of the MT 1_1.

As the macrotask MT 1_2 (502) obtained from the input program 400 is acoarse-grain size block constituted of a plurality of loops orsubroutines, the compiler 40 further divides the macrotask MT into aplurality of macrotasks MTs in a tiered manner. Therefore, in themacrotask graph MTG, a macrotask graph MTG 1_2 is further generated inanother tier in the MT 1_2. In the case of the macrotask MT 1_3 (503),similarly, a macrotask graph MTGMTG 1_3 of another tier is generated.

In the case of the macrotask MTG 1_2 (510) in the macrotask MT 1_2(502), the solid lines extend from a task MT 1_2_1 (511) to a task MT1_2_2 (512), a task MT 1_2_4 (514), and a task MT 1_2_5 (515), after theend of execution of the MT 1_2_1 (511), these three tasks 512, 514 and515 can be simultaneously executed.

Further, the task MT 1_2_2 (512) has dependence on a task MT 1_2_3(513). In this case, it is only necessary to execute the task of the MT1_2_3 (513) after the end of the task of the MT 1_2_2 (512). The solidlines extending from the tasks MT 1_2_4 (514) and MT 1_2_5 (515) to atask MT 1_2_6 (516) mean that the MT 1_2_6 can be executed when theexecution of both tasks MT 1_2_4 (514) and MT 1_2_5 (515) is finished.

As described above, a task processing order considering parallelism inthe macrotasks MTs 1_2 is established before execution, and tasks can bescheduled onto PUs beforehand in a fixed (static) manner at a compilingstage.

In the case of a macrotask graph MTG (520) in the macrotask MT 1_3(503), there is a small circle in a macrotask MT 1_3_1 (521). Thisindicates that the task MT 1_3_1 (521) includes a condition branch.Broken lines with arrows extend from the small circle to tasks MT 1_3_2(522) and MT 1_3_5 (525) and an arc 529 of a dotted line indicating anOR condition of control dependence is overlapped therewith, whichindicates that the condition branches to one of the tasks MT 1_3_2 andMT 1_3_5.

A broken line with no arrow extends to a task MT 1_3_3 (523), and an arc528 of a solid line indicating an AND condition in control dependenceoverlaps with the broken line with no arrow extending to the task MT1_3_3 (522) and with a broken line connected to the task MT 1_3_2 (523).This indicates that if the process branches to the task MT 1_3_2indicated by an arrow under this condition, the task MT 1_3_3 dependentfor control on the same branch can simultaneously be executed. Thebroken lines shown in the drawing indicate a control dependency relationto establish task execution and a condition on which a task dependent ondata is not executed. The broken line of the arrow indicates that theprocess is identical to the control flow (i.e., original) obtained inthe data dependence/control flow analysis (402).

The condition branch of the task MT 1_3_1 (521) must be scheduledaccording to a situation of execution time as a branch direction is notestablished unless the task MT 1_3_1 is executed. When the conditionbranch is established and the process branches in the directions of thetasks MT 1_3_2 (522) and MT 1_3_3 (523), as solid lines indicating adata dependency relation extend from the tasks MT 1_3_2 (522) and MT1_3_3 (523) to the task MT 1_3_4 (524), processing of the task MT 1_3_4can be executed at the time when processing of both tasks MT (522 and523) is finished.

When the process branches in the direction of the task MT 1_3_5 (525),processing of tasks MT 1_3_6 (526) and MT 1_3_7 (527) can be executedsimilarly to the above at the time when the task 525 is finished, due tothe data dependency relation.

<Processor Grouping>

Next, the compiler 40 refers to the generated macrotask graph MTG table421 to execute processor grouping according to a shape and parallelismof the macrotask graphs or an instruction from the user (406).

Specifically, shapes and parallelism of upper tier macrotasks MTsrepresented by the macrotask graph MTG, e.g., the macrotasks MT 1_2(5202) and MT 1_3 (503) are analyzed, the PUs 10 to 17 necessary forprocessing the macrotasks MTs are grouped, and tasks MT are allocated tothe groups. One group is formed of a set including at least onegeneral-purpose processor (CPU) for controlling accelerator units (DSP,DRP, and BMP) in the group. That is, when a proper group configurationof processor PUs can be decided during compiling because of theconfiguration of the macrotask graph MTG, the compiler 40 executesgrouping including the accelerator units.

When processor grouping cannot be executed during compiling because ofthe configuration of the macrotask graph MTG, i.e., when tasks to beused by the accelerator units are present in multiple tiers and groupingcannot properly be executed, the compiler 40 or the general-purposeprocessor functioning as a scheduler during execution allocates tasks tothe accelerator units during compiling. In this case, when loads on theaccelerator units are large, the general-purpose processor carries outthe process instead of the accelerator units. Decided groupinginformation is held as a processor grouping table 422 in the externalstorage device to be used for processing of rear stages.

According to this embodiment, in the macrotask graph MTG 1 (500) of FIG.22, processing costs of the macrotasks MT 1_2 (502) and MT 1_3 (503) areequal to each other, and the accelerator units must be controlled by thegeneral-purpose processor during the execution of the macrotask graphsMTG 1_2 (510) and MTG 1_3 (520) in the macrotask. Therefore, twoprocessor groups are defined.

Next, a configuration of the accelerator units necessary in eachprocessor group is determined according to processing costs andparallelism of the PUs of the macrotasks MT 1_2 and MT 1_3. According tothis embodiment, a necessary unit configuration can be realized byusable resources in the macrotask graph MTG 1, so a processor group isdecided to be a CPU 0, a DSP 0, a DRP 0 and a DRP 1, and a CPU 1, a DSP1, a BMP 0 and BMP 1 during compiling.

<Static Schedule and Dynamic Schedule>

The compiler 40 next decides which of a static schedule and a dynamicschedule to adopt as a scheduling method (407). Each scheduling methodwill be described below in detail, but brief explanation will be madefirst. In the case of a MT flow where there is no condition branch in atask MT but earliest execution conditions can be predetermined, thestatic schedule is applied, where the compiler 40 executes task MTscheduling beforehand to insert synchronous and frequency and voltagecontrol codes (scheduling codes) among the tasks.

In the case of a MT flow unpredictable during compiling, e.g., there isa condition branch in the task MT, or processing time of the task MTfluctuates during execution, the dynamic schedule is applied, and thecompiler 40 generates a scheduling program for executing control duringexecution according to a situation such as a branch. An advantage ofgenerating the scheduling program (scheduling codes) by the compiler 40is that overhead of several thousand to several tens of thousand clocks,which may be generated if generation of rough grain size tasks andscheduling are requested to the OS or the library as in the case of theconventional multiprocessor, can be avoided.

<Static Scheduling>

First, a process flow of the static scheduling will be described.According to the static scheduling, allocation and execution order ofthe tasks MT have already been decided during compiling. Therefore,first, a macrotask scheduling process 408 refers to information of themacrostatic table 421 and the processor grouping table 422 to generatecontrol information to synchronize execution tasks of the PUs with oneanother or start other tasks, and to decide an insertion place of thecontrol information.

Data transfer information is simultaneously generated to load datanecessary for the task program or the task from the local memory LM ofthe other PU and the shared memory to the local memory LM of the PU. Bysuch a data localization method, the local memory LM is effectivelyutilized to minimize a data transfer amount. The schedule informationgenerated through the process is held as a macrotask schedule table 423in the external storage device.

Subsequently, the compiler 40 executes a static FV scheduling process409. Based on the frequency and voltage control concept during the taskparallel processing execution described above with reference to FIGS. 18a to 18 d, this process judges a margin determined by task processingcosts and a schedule time limit (processing deadline) from the scheduleinformation (macrotask schedule table) generated by the macrotaskscheduling 408, and generates frequency and voltage control informationto set a PU operation mode for deciding a system frequency/supplyvoltage according to the margin. The frequency and voltage controlinformation is held as a power supply/frequency and voltage controlschedule table 424 in the external storage device. For example, themargin is determined based on processing time from an execution start toexecution completion and to the processing time limit, and indicates aperformance margin of each of the PUs 10 to 17. For example, as shown inFIG. 19 a, a margin is judged to be large if time from the executioncompletion to the processing time limit of the CPU 0 is long. On theother hand, a margin is judged to be short when time from the executioncompletion to the processing time limit is short.

The processing time limit (allowance time) may be described in the inputprogram or input from a console (not shown) during the processing of thecompiler 40.

<Dynamic Scheduling>

Next, a process flow of the dynamic scheduling will be described.According to the dynamic scheduling, scheduling contents cannot bedecided during compiling because of uncertain data such as a conditionbranch in the task MT. Therefore, the compiler 40 generates a schedulingprogram to dynamically execute scheduling during program execution basedon the processing result of the task MT (410). This program starts orsynchronizes the tasks MT or loads data necessary for the MT, based onthe processing result. Additionally, based on the frequency and voltagecontrol concept of the task parallel processing execution time describedabove with reference to FIGS. 18 a to 18 d, the program sets anoperation mode (frequency and voltage control mode) for deciding asystem frequency/supply voltage of the PU. The generated schedulingprogram is held as a power supply/frequency and voltage control scheduletable 424 in the external storage device.

<Generation of Scheduling Code>

Through the above process, the compiler 40 completes the scheduling ofthe input program 400 to the PUs 10 to 17. The pieces of schedulinginformation generated through the process have been stored as the tables(421 to 424) in the external storage device. The compiler 40 accessesthe tables (421 to 424), reads the task execution order, the datatransfer information, and the frequency and voltage control information,and adds, with respect to the input program, a control code (schedulingcode) to the static schedule part of and a scheduling program to thedynamic schedule part (411). The control code is generated by, forexample, using a MPI (message passing interface) which is a parallelprogramming standard interface of a distributed memory typemultiprocessor system. The input program to which the codes have beenadded is processed by a local compiler prepared for each type of PU tobe converted into an execution binary code of the PU (412). The localcompiler is prepared for each type of PU of the CPU, the DSP, the DRP,and the BMP as descried above, and loads the local compiler according toeach type of PU to generate an execution binary code.

<Result of Scheduling>

FIG. 23 shows an example of a result of the scheduling. FIG. 23 showsthe MT scheduling result for each PU based on a time axis. According tothis example, as the CPU 0 executes management for starting orsynchronizing of the tasks and frequency and voltage control, thecontrol code 550 generated by the compiler 40 is first loaded to the CPU0. The control code 550 is represented by a code for executing frequencyand voltage control of each PU and a code for starting the macrotask MT1_1 in the CPU 0. In other words, the CPU 0 sets a value of thefrequency and voltage control register to “3” so that an operation modeof the CPU 0 for executing the macrotask MT 1_1 can be FULL. Since thereis no MT to be processed for the other PU, a value of the frequency andvoltage control register is set to “0” so that the operation can be OFF.Next, the CPU 0 starts processing of the macrostatic MT 1_1 by its ownCPU 0.

After the processing end of the macrotask MT 1_1 in the CPU 0, thecontrol code 551 generated by the compiler 40 is executed to set afrequency and voltage control mode. Tasks to be processed next are atask MT 1_2_1 and a task MT 1_3_1 designated by the macrotask graph MTGof the lower tier of the macrotasks MT 1_2 and MT 1_3. The former isexecuted by the CPU 0, and the latter is executed by the CPU 1.

Accordingly, the CPU 0 sets the frequency and voltage control registerof the CPU 1 for processing the task MT 1_3_2 to a normal mode (FULL).Regarding the CPU 0, the frequency and voltage control mode has been setto a normal mode, but the normal mode (FULL) is maintained tosuccessively process the MT 1_2_1.

In this case, as there is no task to be processed in the other PU duringthe processing of the task MT 1_2_1 and the task MT 1_3_1, an operationmode is maintained OFF for the other PU. Then, the CPU 0 startsprocessing of the task MT 1_2_1 by its own CPU 0 and the task MT 1_3_1by the CPU 1.

As described above, the scheduling has been executed during compiling,since the macrotask MTG 1_2 includes no condition branch (staticscheduling). The tasks MT are allocated to the group of the CPU 0, theDSP 0, the DRP 0, and the DP 1. As the macrotask MTG 1_3 includes acondition branch, a program for executing scheduling during execution isadded, and the tasks MT are allocated to the group of the CPU 1, the DSP1, the BMP 0 and the BMP 1 based on an execution result.

Next, scheduling of the task MT group of the macrotask graph MTG 1_2will be described. Upon an end of the execution of the task MT 1_2_1 atthe CPU 0, the CPU 0 executes the control code 552, and sets thefrequency and voltage control register to “3” to set the DSP 0 to anormal operation mode FULL so as to process the task MT 1_2_2. In thecase of the tasks MT 1_2_4 and MT 1_2_5, the frequency and voltagecontrol register is set to “2” to set the DRP 0 and the DRP 1 to alow-power operation mode MIDDLE, based on margin judgment of the tasksby the FV scheduling during compiling. There is no MT to be executed bythe CPU 0, but the CPU 0 executes the scheduler to manage the tasks ofthe DSP 0, the DRP 0, and the DRP 1 in synchronization. Therefore, thescheduler sets the frequency and voltage control register to “1” to seta low-power operation mode LOW for the CPU 0. Then, processing of thetask MT 1_2_2, the task MT 1_2_4, and the task MT 1_2_5 are started.After the MT processing end, the task MT 1_2_3 is similarly executed atthe DSP 0. Accordingly, task start reservation (task registration intask ready queue) is made for the task MT 1_2_2 to start the task MT1_2_3 at the end of the task MT 1_2_2.

Next, upon judging that the processing of the task MT 1_2_4 and the taskMT 1_2_5 have both been finished, the CPU 0 executes the control code553, sets the operation mode of its own CPU for processing the task MT1_2_6 to MIDDLE, operation modes of the DRP 0 and the DRP 1 to OFF asthere is no task to be processed in the DRP 1, and processing of thetask MT 1_2_6 is started in a state where a voltage and a systemfrequency are reduced from normal levels. Upon end of a processing ofthe task MT 1_2_6, the CPU 0 executes the control code 554. Upon judgingthat the processing of the task MT 1_2_3 has been finished, the CPU 0sets the operation mode of the DSP 0 to OFF as task processing has beencompleted in the MTG 1_2 group.

Next, a task MT group of the MTG 1_3 will be described. The macrotask MT1_3 includes a branch, whose direction cannot be identified unless thetask is executed. Accordingly, a dynamic scheduler 555 for loading thetask and data, starting the task, and managing the synchronous andfrequency and voltage control codes depending on a situation duringexecution is executed by the CPU 1. The scheduler 555 first sets anoperation mode of the CPU 1 to

FULL to execute the task MT 1_3_1, and starts the task MT 1_3_1. Afterthe execution end of the task MT 1_3_1, the scheduler 556 judges abranch direction to determine a task to be started next.

According to the scheduling shown in FIG. 23, the task MT 1_3_2 isprocessed by the DSP 1, and the task MT 1_3_3 is processed by the BMP 0.Before the start of the processing, the scheduler 556 sets an operationmode of the DSP 1 to FULL and an operation mode of the BMP 0 to LOWaccording to the FV scheduling result. Though there is no task MT to beexecuted in the CPU 1, the CPU 1 executes the scheduler 556 to carry outtask management of the DSP 1 and the BMP 0. Therefore, the scheduler 556sets an operation mode of the CPU 1 to a low-power mode LOW.

Next, upon judging of the processing end of both of the task MT 1_3_2and the task MT 1_3_3, the dynamic scheduler 557 of the CPU 0 sets anoperation mode (frequency and voltage control mode) of its own CPU 0 forprocessing the task MT 1_3_4 to FULL, and operation modes of the DSP 1and the BMP 0 having no tasks to be executed to OFF. Then; the task MT1_3_4 is executed by its own CPU 0.

As described above, in the multiprocessor constituted of the PUs 10 to17 of different types, the input programs are parallelized and scheduledby the multigrain parallel processing so as to reduce the execution timeto minimum, and then system frequency control and power supplymanagement are precisely carried out for each PU. Hence, it is possibleto reduce power consumption within the minimum execution time withoutdeteriorating performance.

<Object Program Generated by Compiler>

FIGS. 24 and 25 show examples of output programs (object codes) obtainedby adding the scheduling codes described above for scheduling to theinput program 400 and outputted for each PU by the compiler 40. FIGS. 24and 25, the processing shown in FIG. 23 is described. FIG. 24 showsexecution codes of the CPU 0, the DSP 0, the DRP 0, and the DRP 1 areshown as a processor group for processing the macrotask MTG 1_2. FIG. 25shows PU execution codes of the CPU 1, the DSP 1, the BMP 0, and the BMP1 as a processor group for processing the macrotask MTG 1_3. Thegenerated codes of the compiler 40 are represented by pseudo codes whichare actually represented according to an interface standard such as MPIas described above.

<CONCLUSION>

As described above, this invention provides the multiprocessor systemwhere various processor units PU are integrated, in which the program isdivided to be arranged for efficient operation of the PUs and thecompiler 40 generates the control code to thereby carry out the processefficiently with low power within minimum processing time while makingbest use of the performance of the system. Moreover, the softwaredeveloper can create highly efficient programs within a short timewithout giving consideration to the processor configuration.

<Supplement>

The embodiment has been described by way of example where themultiprocessor system equipped with the plurality of PUs 10 to 17 in onechip is applied to this invention. However, the multiprocessor systemcan also be applied to a parallel computer of FIG. 1 equipped with aplurality of chips, and operation effects similar to the above can beobtained.

According to claims 14, 22, and 30, the multigrain parallelizationcompiler is characterized in that the number of processing cycles forprocessing the unit blocks is obtained based on the profilinginformation set for each processor unit, and the calculation cycle timeis obtained from the processing cycles.

According to claims 14, 22, and 30, the multigrain parallelizationcompiler is characterized in that the unit blocks are converted intoexecution codes by the local compiler set for each processor unit, thenumber of processing cycles for processing the unit blocks is obtainedbased on the profiling information set for each processor unit, and thecalculation cycle time is obtained based on the number of processingcycles.

According to claims 15, 23, and 31, the multigrain parallelizationcompiler is characterized in that the number of processing cycles forprocessing the unit blocks is obtained based on the profilinginformation set for each processor unit, and the power is obtained fromthe processing cycles.

According to claims 15, 23, and 31, the multigrain parallelizationcompiler is characterized in that, as regards the calculation cycletime, the unit blocks are converted into execution codes by the localcompiler set for each processor unit, the number of processing cyclesfor processing the unit blocks is obtained based on the profilinginformation set for each processor unit, and the power is obtained basedon the number of processing cycles.

According to claims 13, 21, and 29, the multigrain parallelizationcompiler is characterized in that: the process of extracting theparallelism of the unit blocks includes a process of storing theextracted unit blocks in the macrotask graph table, and grouping theprocessor units necessary for processing the unit blocks to store thegroup in the processor grouping table; and

the process of generating the scheduling codes includes a process ofreferring to the macrotask graph table, the processor grouping table,and the cost information to generate control codes for the processorunits, and a process of inserting the control codes according toexecution order of the unit blocks.

According to claims 13, 21, and 29, the multigrain parallelizationcompiler is characterized in that: the process of extracting theparallelism of the unit blocks includes a process of storing theextracted unit blocks in the macrotask table, and grouping the processorunits necessary for processing the unit blocks to store the group in theprocessor grouping table; and

the process of generating the scheduling codes includes a process ofreferring to the macrotask graph table, the processor grouping table,and the cost information to generate a scheduling program fordynamically scheduling the unit blocks, and a process of inserting thescheduling program according to the execution order of the unit blocks.

INDUSTRIAL APPLICABILITY

According to this invention, there is provided a multiprocessor systemwhere various PUs are integrated, in which the program is divided to bearranged for efficient operation of the PU and the compiler generatesthe control code, to thereby efficiently carry out the process with lowpower while making best use of the performance of the processor system.The software developer can efficiently create programs within a shorttime without giving consideration to the processor configuration. As aresult, this invention can be applied to an LSI for use in a carnavigation system, a portable telephone, or information appliance, whichis strongly required to carry out a process with high calculationperformance and with low power at the same time, to thereby attainfunctions of performing high-quality moving image production or voiceprocessing, and image or voice recognition. This invention can also beapplied to an LSI for use in an information or control system of anautomobile, with which automatic driving or safe driving system can berealized. Further, the invention can be applied in the future to asupercomputer which is required to have very high microprocessing powerat low power consumption

1. A multiprocessor system having a plurality of processor units ofsingle type or plural types, characterized by comprising: a clock supplyunit for supplying one of a plurality of clock frequencies as a systemclock to the processor units; a power supply unit for supplying one of aplurality of voltages as a clock voltage to the processor units; and asystem control register for setting a system clock and a system voltageto be supplied to each processor unit, and in that one of the processorunits sets, in the system control register, a system clock and a systemvoltage to be supplied to each processor unit, based on scheduling ofparallel processing.
 2. The multiprocessor system according to claim 1,characterized in that the clock supply unit supplies, as a system, clocka frequency which is an integral submultiple of a frequency input to theclock supply unit.
 3. The multiprocessor system according to claim 1,characterized in that the system control register presets a systemvoltage optimized for each of a plurality of the preset clockfrequencies, and one of the processor units selects the system frequencybased on the set value of the system control register, and determines asystem voltage corresponding to the system frequency.
 4. Themultiprocessor system according to claim 1, characterized in that thesystem control register sets a plurality of bit fields corresponding toa plurality of functional portion units constituting the multiprocessorsystem, and sets a system frequency and a system voltage to each of thefunctional portion units according to the value set in the bit field. 5.The multiprocessor system according to claim 4, characterized in that:the processor unit includes a memory divided into a plurality of areasbeforehand; and the system control register has bit fields correspondingto the functional portions and the plurality of areas of the memory, andsets a system frequency and a system voltage, respectively, to each areaof the memory according to the value set in the bit field.
 6. Themultiprocessor system according to claim 5, characterized in that: thebit fields have individual addresses; and the processor unit sets asystem frequency and a system voltage to one of the functional portionsor one area of the memory corresponding to one of the bit fields, bysetting the values with reference to the addresses.
 7. Themultiprocessor system according to claim 4, characterized in that: thefunctional portions include a memory in the processor unit, a shapedmemory shaped by the plurality of processor units, and a local bus forinterconnecting the processor units; and at least one of the functionalportions has the system frequency or the system voltage changed for eachfunctional portion unit.
 8. The multiprocessor system according to claim1, characterized by further comprising: a shared memory shared by aplurality of processors of the processor units; a plurality of areaspreset in the shared memory; and a second system control register forsetting a system voltage to be supplied for each area of the sharedmemory, and in that the processor unit sets a system voltage to eacharea of the shared memory according to the value set in the secondsystem control register.
 9. The multiprocessor system according to claim1, characterized in that one of the processor units sets a system clockand a system voltage to be supplied to each of the processor units inthe system control register according to scheduling with whichprocessing time of parallel processing can be reduced to minimum. 10.The multiprocessor system according to claim 1, characterized in thatthe system control register has an address unique to each processor unitset in an address area of the multiprocessor system, and is set to beaccessed from each processor unit.
 11. The multiprocessor systemaccording to claim 1, characterized in that the system control registeris arranged for each processor unit.
 12. The multiprocessor systemaccording to claim 1, characterized in that the processor units areinterconnected through a local bus, and the system control register isarranged in a control table connected to the local bus to store the setvalue of each processor unit.